//
//  UIButton+Extension.h
//  BasicFramework
//
//  Created by Rainy on 16/10/26.
//  Copyright © 2016年 Rainy. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIButton+layout.h"
//typedef NS_ENUM(NSUInteger, MKButtonEdgeInsetsStyle) {
//    MKButtonEdgeInsetsStyleTop, // image在上，label在下
//    MKButtonEdgeInsetsStyleLeft, // image在右，label在左
//    MKButtonEdgeInsetsStyleBottom, // image在下，label在上
//    MKButtonEdgeInsetsStyleRight// image在左，label在右
//};

@interface UIButton (Extension)

/**
 *  设置button的titleLabel和imageView的布局样式，及间距
 *
 *  @param style titleLabel和imageView的布局样式
 *  @param space titleLabel和imageView的间距
 */
- (void)buttonWithEdgeInsetsStyle:(MKButtonEdgeInsetsStyle)style
                        imageTitleSpace:(CGFloat)space;


-(dispatch_source_t )startTime:(NSInteger )timeout title:(NSString *)tittle waitTittle:(NSString *)waitTittle finished:(void(^)(UIButton *button))finished;
-(void)cancelTimer:(dispatch_source_t)timer;

-(UIImageView *)addImg:(UIImage *)img withIMGframe:(CGRect )IMGframe;

-(void)setFrame:(CGRect)frame Title:(NSString *)title font:(UIFont *)font fontColor:(UIColor *)fontColor State:(UIControlState)state;

@end
